* {
    margin: 0;
    padding: 0;
}
body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #212121;
}
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.card {
    width: 400px;
    height: 400px;
    overflow: hidden;
    margin: 10px;
    background-color: #000;
    color: #fff;
    cursor: pointer;
    position: relative;
}
.card img {
    width: 100%;
    height: 100%;
    transition: 0.35s;
}
.card .text {
    position: absolute;
    inset: 30px;
    padding: 0 18px;
}
.card .text::before {
    content: "";
    position: absolute;
    inset: 0;
    left: 100%;
    border-left: 4px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: 0.5s;
    transition-delay: 0.6s;
}
.card .text h2,
.card .text p {
    margin-bottom: 6px;
    opacity: 0;
    transition: 0.35s;
}
.card .text h2 {
    font-weight: 250;
    line-height: 2em;
    text-transform: uppercase;
    transform: translate(30%, 0%);
    transition-delay: 0.3s;
}
.card .text p {
    font-weight: 200;
    line-height: 2em;
    transform: translate(0%, 30%);
}

/* 悬停样式 */
.card:hover img {
    opacity: 0.3;
}
.card:hover .text h2 {
    opacity: 1;
    transform: translate(0%, 0%);
    transition-delay: 0.4s;
}
.card:hover .text p {
    opacity: 0.9;
    transform: translate(0%, 0%);
    transition-delay: 1s;
}
.card:hover .text::before {
    background-color: rgba(255, 255, 255, 0);
    left: 0;
    opacity: 1;
    transition-delay: 0s;
}